//
//  MyTableViewCell.m
//  UI 豆瓣完整版
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "MyTableViewCell.h"

@implementation MyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}


- (void)dealloc {
    [_timeLabel release];
    [_addressLabel release];
    [_typeLabel release];
    [_smallLabel1 release];
    [_smallLabel2 release];
    [_img1 release];
    [_img2 release];
    [_img3 release];
    [_bigImg release];
    [_blueimg release];
    [_whiteimg release];
    [super dealloc];
}

- (void)createSubviews {
    self.blueimg = [[UIImageView alloc] init];
    [self.contentView addSubview:_blueimg];
    [_blueimg release];
    
    self.whiteimg = [[UIImageView alloc] init];
    [_blueimg addSubview:_whiteimg];
    [_whiteimg release];
    
    self.timeLabel = [[UILabel alloc] init];
    [_whiteimg addSubview:_timeLabel];
    [_timeLabel release];
    
    self.addressLabel = [[UILabel alloc] init];
    [_whiteimg addSubview:_addressLabel];
    [_addressLabel release];
    
    self.typeLabel = [[UILabel alloc] init];
    [_whiteimg addSubview:_typeLabel];
    [_typeLabel release];
    
    self.smallLabel1 = [[UILabel alloc] init];
    [_whiteimg addSubview:_smallLabel1];
    [_smallLabel1 release];
    
    self.smallLabel2 = [[UILabel alloc] init];
    [_whiteimg addSubview:_smallLabel2];
    [_smallLabel2 release];
    
    self.bigImg = [[UIImageView alloc] init];
    [_whiteimg addSubview:_bigImg];
    [_bigImg release];
    
    self.img1 = [[UIImageView alloc] init];
    [_whiteimg addSubview:_img1];
    [_img1 release];
    
    self.img2 = [[UIImageView alloc] init];
    [_whiteimg addSubview:_img2];
    [_img2 release];
    
    self.img3 = [[UIImageView alloc] init];
    [_whiteimg addSubview:_img3];
    [_img3 release];
    
    self.blueLabel = [[UILabel alloc] init];
    [_blueimg addSubview:_blueLabel];
    [_blueLabel release];
    

}


- (void)layoutSubviews {
    [super layoutSubviews];
    _img1.frame = CGRectMake(3, 3, 16, 16);
    _img1.image = [UIImage imageNamed:@"icon_date@2x.png"];

    _img2.frame = CGRectMake(3, 23, 16, 16);
    _img2.image = [UIImage imageNamed:@"icon_spot@2x.png"];

    _img3.frame = CGRectMake(3, 43, 16, 16);
    _img3.image = [UIImage imageNamed:@"icon_catalog@2x.png"];

    _timeLabel.frame = CGRectMake(20, 3, 170, 16);
    _timeLabel.font = [UIFont systemFontOfSize:13];

    _addressLabel.frame = CGRectMake(20, 23, 190, 16);
    _addressLabel.font = [UIFont systemFontOfSize:13];


    _typeLabel.frame = CGRectMake(20, 43, 150, 16);
    _typeLabel.font = [UIFont systemFontOfSize:13];


    _smallLabel1.frame = CGRectMake(15, 90, 75, 16);
    _smallLabel1.font = [UIFont systemFontOfSize:10];


    _smallLabel2.frame = CGRectMake(95, 90, 75, 16);
    _smallLabel2.font = [UIFont systemFontOfSize:10];

    
    _blueLabel.frame = CGRectMake(5, 3, 300, 20);
    _blueLabel.font = [UIFont systemFontOfSize:15];

    
    _bigImg.frame = CGRectMake(220, 3, 70, 100);
    _bigImg.backgroundColor = [UIColor orangeColor];
    
    _blueimg.frame = CGRectMake(375 / 2 - 152, 15, 304, 140);
    _blueimg.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
    
    _whiteimg.frame = CGRectMake(2, 25, 300, 110);
    _whiteimg.image = [UIImage imageNamed:@"bg_share_large.png"];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
